Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build - don't use pull_request_target anymore #92

Merged
merged 1 commit into from
Feb 10, 2025

Conversation

Erwinvandervalk
Copy link
Contributor

@Erwinvandervalk Erwinvandervalk commented Feb 7, 2025

What issue does this PR address?
The build no longer uses pull_request_target as this just compiles main, not the target branch.

Previously, the build used pull_request_target. Effectively, this means that the entire context (including which code to build) was pointing to the target of the PR (likely main). This means it wasn't building anything in the PR, but actually building main (not very useful in a PR workflow)

How does it work?
Builds / pr's from contributors are run trusted and can access security tokens needed for signing. If you create a branch in the DuendeSoftware repo, then you'll automatically get a CI build for this. You can (must) create a PR for this to get it merged. When you create a PR, the build script will detect that there is still a branch for it and will built it normally (skip the PR build).

Builds from PR's created from external contributors (which have to originate from a different fork) will NOT run with security tokens, so artifacts will not be signed / pushed.

@Erwinvandervalk Erwinvandervalk self-assigned this Feb 7, 2025
@Erwinvandervalk Erwinvandervalk added impact/non-breaking The fix or change will not be a breaking one area/all Across all components. labels Feb 7, 2025
@Erwinvandervalk Erwinvandervalk marked this pull request as ready for review February 7, 2025 10:28
@Erwinvandervalk Erwinvandervalk merged commit 1237fca into main Feb 10, 2025
16 checks passed
@Erwinvandervalk Erwinvandervalk deleted the ev/build-pull-request branch February 10, 2025 06:45
@damianh damianh added area/repo Related to GitHub actions, codeowners, folder structures, gitattributes etc and removed impact/non-breaking The fix or change will not be a breaking one area/all Across all components. labels Feb 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/repo Related to GitHub actions, codeowners, folder structures, gitattributes etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants